package com.qikux.dao;

import com.qikux.entity.*;
import com.qikux.vo.Page;
import com.qikux.vo.ResourceVo;

import java.util.List;
import java.util.Map;

public interface DetailDao {

    /**
     * 通过资源id查找资源
     * @param resId
     * @return
     */
    ResourceVo findResourceById(Long resId);

    ResourceCollection collect(Long resId, Long userId);

    void saveCollection(Long resId, Long userId);

    void deleteCollection(Long resId, Long userId);

    ResourceVo findResourceById(Long resId, Long id);


    List<Map<String, Object>> findResourceCommentByResId(Long resId, Page<Map<String, Object>> pageBean);

    int findCommnetByResId(Long resId);

    UserInfo findUserInfoByUserId(Long userId);

    Map<String,Object> findPhotoByUserId(Long userId);


    Resource findResourceByUserId(Long userId, Long resId);

    List<Map<String, Object>> findDownLoadTime(Long userId, Long resId);

    void saveResourceHistory(Long userId, Long resId);

    int findScoreByUserId(Long userId);

    int findDownloadCount(Long resId);

    Notice findNoticeByUserIdAndContent(Notice notice);

    void saveNotice(Notice notice);
}
